#include "ackKNXMacCmd.h"

ackKNXMacCmd::ackKNXMacCmd(QObject *parent) :
    BaseCmd(parent)
{
    this->m_protocolType = ProtocolType::SWKNXProtol;
    this->m_functionCode = FunctionCode;
}
void ackKNXMacCmd::unPackage(Package package)
{
    QByteArray body;


    body = package.body();
    if(body.size()==2)
    {
        m_Mac = body.at(0)<<8|body.at(1);

        printf("KNX MAC is %d\r\n",m_Mac);
    }

}
Package ackKNXMacCmd::toPackage()
{
    Package package;
    QByteArray body;

    return package;
}

void ackKNXMacCmd::setKNXMac(quint32 mac)
{
    m_Mac = mac;
}
quint32 ackKNXMacCmd::getKNXMac(){
    return m_Mac;
}
